Post

Replies

Boosts

Views

Activity

Comment on New iOS String Initializer can't get correct localized String for specific locale
Thanks for your reply, it helped me to figure out the use of locale, it seems I had a problem understanding locale in String before. I used the new Formatter API ParseableFormatStyle and tried to let it be used to specify the text in the output by the following code let colorString = UIColorFormatStyle().mark().locale(Locale(identifier: "zh-cn")).format(UIColor.blue) Looks like I need to tweak the string handling a bit. https://www.fatbobman.com/posts/newFormatter/
Topic: App & System Services SubTopic: General Tags:
Oct ’21
Comment on SwiftData #Predicate cannot test for nil relationship
func query(group: Group) { let id = group.id let predicate = #Predicate<Item> { item in item.group?.id == id // Compiles } } @MarcusAurelius This method can indeed compile, but when I use similar code to run, the following error message will appear: Thread 1: Fatal error: Couldn't find \Tag.id on Tag with fields May I ask if your code can use the above predicate to fetch data?
Sep ’23